package com.xiaocan.secondhand.Controller;

import com.xiaocan.secondhand.pojo.user;
import com.xiaocan.secondhand.service.userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class userController {
    @Autowired
    userService userService;

    @RequestMapping("test")
    @ResponseBody
    public List<user> test() {
        System.out.println(123);
        List<user> all = userService.findAll();

        return all;
    }
}
